package com.bdqn.Service.Stock.impl;

import com.bdqn.Service.Stock.StockService;
import com.bdqn.entity.Stock;
import com.bdqn.mapper.Stock.StockMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StockServiceImpl implements StockService   {
    @Autowired
    private StockMapper mapper;

    @Override
    public List<Stock> findAllByPageAndLike(Stock stock, Integer pageNum, Integer pageSize) {
        return mapper.findAllByPageAndLike(stock,pageNum,pageSize);
    }

    @Override
    public List<Stock> SelX(Stock stock, Integer pageNum, Integer pageSize) {
        return mapper.SelX(stock,pageNum,pageSize);
    }

    @Override
    public int getCount() {
        return mapper.getCount();
    }

    @Override
    public boolean Insert(Stock stock) {
        return mapper.Insert(stock);
    }

    @Override
    public boolean Stork_OrderInsert(int id, int[] ids) {
        return mapper.Stork_OrderInsert(id, ids);
    }

    @Override
    public Stock FindByNum(Stock stock) {
        return mapper.FindByNum(stock);
    }

    @Override
    public Stock findById(Stock stock) {
        return mapper.findById(stock);
    }

    @Override
    public boolean Update(Stock stock) {
        return mapper.Update(stock);
    }

    @Override
    public boolean UpdateById(Stock stock) {
        return mapper.UpdateById(stock);
    }

    @Override
    public List<Stock> findSP(Stock stock, Integer pageNum, Integer pageSize) {
        return mapper.findSP(stock, pageNum, pageSize);
    }

    @Override
    public int getSPCount() {
        return mapper.getSPCount();
    }

    @Override
    public boolean UpdateByName(Stock stock) {
        return mapper.UpdateByName(stock);
    }

    @Override
    public List<Stock> SelX1(Stock stock, Integer page, Integer limit) {
        return mapper.SelX1(stock,page,limit);
    }

    @Override
    public boolean Delete(int id) {
        return mapper.Delete(id);
    }

    @Override
    public Stock FindByNum1(Stock stock) {
        return mapper.FindByNum1(stock);
    }

    /**
     * 审批采购计划
     *
     * @param stock
     * @return
     */
    @Override
    public boolean UpdateByIdPr(Stock stock) {
        return mapper.UpdateByIdPr(stock);
    }

    @Override
    public Stock SelectByNum(String num) {
        return mapper.SelectByNum(num);
    }
}
